import request from '../utils/request'
/** 友情链接接口 */
// 分页
export function linkPageList (params) {
    return request({
        url: '/api/v1/system/link/pageList',
        method: 'get',
        params
    })
}

// 保存
export function linkSave (parms) {
    return request({
        url: '/api/v1/system/link/save',
        method: 'post',
        data: {
            name: parms.name,
            address: parms.address,
            type: parms.type,
            sort: parms.sort
        }
    })
}

// 修改
export function linkUpdate (parms) {
    return request({
        url: '/api/v1/system/link/update',
        method: 'post',
        data: {
            id: parms.id,
            name: parms.name,
            address: parms.address,
            type: parms.type,
            sort: parms.sort
        }
    })
}

// 删除
export function linkDeletes (parms) {
    return request({
        url: '/api/v1/system/link/deletes',
        method: 'post',
        data: parms
    })
}

/** 系统公告接口 */
// 分页
export function noticePageList (params) {
    return request({
        url: '/api/v1/system/notice/pageList',
        method: 'get',
        params
    })
}

// 保存
export function noticeSave (parms) {
    return request({
        url: '/api/v1/system/notice/save',
        method: 'post',
        data: {
            title: parms.title,
            content: parms.content,
            type: parms.type,
            sort: parms.sort
        }
    })
}

// 修改
export function noticeUpdate (parms) {
    return request({
        url: '/api/v1/system/notice/update',
        method: 'post',
        data: {
            id: parms.id,
            title: parms.title,
            content: parms.content,
            type: parms.type,
            sort: parms.sort
        }
    })
}

// 删除
export function noticeDeletes (parms) {
    return request({
        url: '/api/v1/system/notice/deletes',
        method: 'post',
        data: parms
    })
}

/** 系统日志接口 */
// 分页
export function logPageList (params) {
    return request({
        url: '/api/v1/system/log/pageList',
        method: 'get',
        params
    })
}

// echarts按天统计
export function countLogEcharts () {
    return request({
        url: '/api/v1/system/log/countLogEcharts',
        method: 'get'
    })
}

// echarts访问排行
export function echartsVisitRankBar () {
    return request({
        url: '/api/v1/system/log/echartsVisitRankBar',
        method: 'get'
    })
}
